package main.java.chessfootball.model.regulation;

import main.java.chessfootball.model.game.Side;

/**
 * User: Igor
 * Date: 11.06.2011
 * Time: 8:37:57
 */
public class Score
{
	private Integer[] goals = new Integer[2];

	public Score(int scoreSide1, int scoreSide2)
	{
		goals[0] = scoreSide1;
		goals[1] = scoreSide2;
	}

	public int getScore(Side side)
	{
		return goals[side.getId()];
	}

	public void goal(Side side)
	{
		goals[side.getId()]++;
	}

	@Override
	public String toString()
	{
		return goals[0] + ":" + goals[1];
	}
}
